
export default {
    state:{
        selectData:'',//头部选中的数据
    },
    mutations: {
        //
        M_SELECT_DATA(state, payload) {

            sessionStorage.selectData = JSON.stringify(payload);
            state.selectData = payload;
        },

    },
    actions: {

        A_SELECT_DATA({commit},payload){
            commit('M_SELECT_DATA',payload);
        },
    },
    getters:{

        G_SELECT_DATA(state){
            return state.selectData || (sessionStorage.selectData && JSON.parse(sessionStorage.selectData));
        },

    }
}
